find min max of three numbers